% de-error control it
% check each triplet. take majority vote
[row,col] = size(sendRes);
receiveRes = zeros(row, col/3);
% loop throw rows, and check triples
for i = (1:row)
    currentRow = sendRes(i,:);
    for a = (3:3:col)
        total = currentRow(1,a-2) + currentRow(1,a-1) + currentRow(1,a);
        if total >= 2
            receiveRes(i, a/3) = 1;
        else
            receiveRes(i, a/3) = 0;
        end
    end
end

% reconstruct and show
imshow(receiveRes)